﻿<navigation:Page x:Class="NthParameterSeries.Views.PortfolioMaintenanceView" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="PortfolioMaintenanceView Page" xmlns:my="clr-namespace:NthParameterSeries.PriceServiceReference" 
                 Loaded="Page_Loaded" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <navigation:Page.Resources>
    </navigation:Page.Resources>
    <Grid x:Name="LayoutRoot" >
        <ListBox Height="100" HorizontalAlignment="Left" ItemsSource="{Binding Path=Portfolios}" 
                 DisplayMemberPath="Name" SelectedValuePath="Id" SelectedValue="{Binding Path=Portfolio}"
                 Margin="24,23,0,0" Name="daoPortfolioListBox" VerticalAlignment="Top" Width="206" SelectionChanged="daoPortfolioListBox_SelectionChanged" />
        <Grid  HorizontalAlignment="Left" Margin="345,35,0,0" Name="grid2" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBox Grid.Column="1" Height="26" HorizontalAlignment="Left" Margin="3,3,0,0" Name="nameTextBox" 
                     Text="{Binding Path=Name, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="147" />
        </Grid>
        <sdk:Label Content="Name:" HorizontalAlignment="Left" Margin="276,35,0,429" VerticalAlignment="Center" />
        <Grid  HorizontalAlignment="Left" Margin="279,113,0,0" Name="grid3" VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="City:" HorizontalAlignment="Left" Margin="3,3,0,3" VerticalAlignment="Center" />
            <TextBox Height="23" HorizontalAlignment="Left" Margin="58,3,0,3" Name="cityTextBox" Text="{Binding Path=Address.City, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
            <sdk:Label Content="Country:" Grid.Row="1" HorizontalAlignment="Left" Margin="3,3,0,3" VerticalAlignment="Center" />
            <TextBox Grid.Row="1" Height="26" HorizontalAlignment="Left" 
                      Margin="58,3,0,0" Name="countryTextBox1" Text="{Binding Path=Address.Country, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="158" />
        </Grid>
        <Grid  HorizontalAlignment="Left" Margin="279,77,0,0" Name="grid4" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="Inception Date:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <sdk:DatePicker Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="inceptionDateDatePicker" SelectedDate="{Binding Path=InceptionDate, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
        </Grid>
        <Button Content="New" Height="23" HorizontalAlignment="Left" Margin="305,209,0,0" Name="addButton" VerticalAlignment="Top" Width="75" Click="AddButton_Click" />
        <Button Content="&amp;Save" Height="23" HorizontalAlignment="Left" Margin="423,209,0,0" Name="saveButton" VerticalAlignment="Top" Width="75" Click="SaveButton_Click" />
        <Grid HorizontalAlignment="Left" Margin="279,260,0,0" Name="grid1" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="Country:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <ComboBox DisplayMemberPath="Name" Grid.Column="1" Height="23" HorizontalAlignment="Left" 
                      ItemsSource="{Binding  Path=Countries, Mode=OneTime}" 
                      SelectedValuePath="Id" SelectedValue="{Binding Path=CountryId, Mode=TwoWay}" Margin="3,3,0,3" Name="countries" VerticalAlignment="Center" Width="161" SelectionChanged="countries_SelectionChanged">
                <ComboBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel />
                    </ItemsPanelTemplate>
                </ComboBox.ItemsPanel>
            </ComboBox>
        </Grid>
        <Grid HorizontalAlignment="Left" Margin="279,296,0,0" Name="grid5" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="Cities:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <ComboBox DisplayMemberPath="Name" Grid.Column="1" Height="23" HorizontalAlignment="Left" 
                      ItemsSource="{Binding Path=Cities, Mode=OneTime}" SelectedValuePath="Id" SelectedValue="{Binding Path=CityId, Mode=TwoWay}" Margin="19,3,0,3" Name="nameComboBox1" VerticalAlignment="Center" Width="158" SelectionChanged="nameComboBox1_SelectionChanged">
                <ComboBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel />
                    </ItemsPanelTemplate>
                </ComboBox.ItemsPanel>
            </ComboBox>
        </Grid>
    </Grid>
</navigation:Page>
